/*
 * Created by: Erik Peterson
 * Created: Monday, November 05, 2007
 */

using System;
using System.Collections.Generic;
using Sitecore.Data.Items;

namespace SitecoreFacade.SitecoreItems
{
    public interface ISitecoreItem
    {

        Item Item { get; }

        /// <summary>
        /// ID of item in Sitecore, which is a string representation of a Guid
        /// </summary>
        string ID { get; }

        /// <summary>
        /// Short ID of item in Sitecore, which is a string representation of a Guid without dashes and braces
        /// </summary>
        string ShortID { get; }

        /// <summary>
        /// Name of item
        /// </summary>
        string Name { get; }

        /// <summary>
        /// Meta title associated with item
        /// </summary>
        string MetaTitle { get; }

        /// <summary>
        /// Title of Sitecore item
        /// </summary>
        string Title { get; }

        /// <summary>
        /// Meta keywords associated with item
        /// </summary>
        string MetaKeywords { get; }

        /// <summary>
        /// Meta description associated with item
        /// </summary>
        string MetaDescription { get; }

        /// <summary>
        /// Friendly URL of item
        /// </summary>
        string FriendlyUrl { get; }

        /// <summary>
        /// Date item was last updated
        /// </summary>
        DateTime LastUpdatedDate { get; }

        /// <summary>
        /// Name of template associated with item
        /// </summary>
        string TemplateName { get; }
        
        /// <summary>
        /// Get children of item
        /// </summary>
        List<ISitecoreItem> GetChildren();

        /// <summary>
        /// Get children of item that have the given template
        /// </summary>
        List<ISitecoreItem> GetChildrenWithSpecifiedTemplate(string templateName);

        /// <summary>
        /// Get children of item that have a template name in the given list of names
        /// </summary>
        List<ISitecoreItem> GetChildrenWithSpecifiedTemplates(params string[] templateNames);

        /// <summary>
        /// Get a count of children that have the specified template
        /// </summary>
        /// <param name="templateName">Name of the template</param>
        /// <returns></returns>
        int GetNumberOfChildrenWithSpecifiedTemplate(string templateName);

        /// <summary>
        /// Retrieve a field from the item with the given name
        /// </summary>
        /// <param name="fieldName">Name of field we are retrieving from the item</param>
        ISitecoreField GetSitecoreField(string fieldName);

        /// <summary>
        /// Parent of the item
        /// </summary>
        ISitecoreItem Parent { get; }

        /// <summary>
        /// Sitecore path of item
        /// </summary>
        string Path { get;  }

        string Render(string fieldName);
    }
}